Ext.namespace('Ext.xredman');

Ext.xredman.Person = function(_cfg){
	Ext.apply(this, _cfg);
};

Ext.apply(Ext.xredman.Person.prototype,{
	print:function(){
		alert(String.format('Person 姓名:{0},性别:{1}',this.name,this.sex));
	}
});

////////////Student,继承时必须写这段，有点怪哇
Ext.xredman.Student = function(_cfg){
	Ext.apply(this, _cfg);
}
//Ext.xredman.Student = Ext.emptyFn;
//在这里重写了print方法
Ext.extend(Ext.xredman.Student, Ext.xredman.Person,{print:function(){
	alert(String.format('Student 姓名:{0},性别:{1}',this.name, this.sex));
}});

//sample
var _person = new Ext.xredman.Person({name:'xredman',sex:'男'});
//_person.print();
var _student =new Ext.xredman.Student({name:'sxredman',sex:'s男'});
_student.print();